import Vue from "vue";
import Router from "vue-router";
import Home from "./views/Home/Home.vue";
import Main from "./views/Main/main.vue";
import Login from "./views/login/login.vue";
import Monitor from "./views/Monitor";
import Events from "./views/Events";
import StationAnalysis from "./views/StationAnalysis";
import TabContent from "./views/StationAnalysis/tabContent.vue"

Vue.use(Router);

export default new Router({
  mode: "history",
  base: process.env.BASE_URL,
  routes: [
    {
      path: "/",
      name: "login",
      component: Login
    },

    {
      path: "/",
      name: "_home",
      redirect: "/home",
      component: Main,
      children: [
        {
          path: "/home",
          name: "home",
          component: Home
        },
        {
          path: "/monitor",
          name: "monitor",
          component: Monitor
        },
        {
          path: "/events",
          name: "events",
          component: Events
        },
        {
          path: "/station-analysis",
          name: "station-analysis",
          component: StationAnalysis,
          children: [
            {
              path: 'station/:station/:dateTime',
              name: 'station',
              component: TabContent
            }
          ]
        }
      ]
    },
    // {
    //   path: "/monitor",
    //   name: "monitor",
    //   component: Monitor
    // },
    {
      path: "/events",
      name: "events",
      component: Events
    }

  //   {
  //     path: "/station-analysis",
  //     name: "station-analysis",
  //     component: StationAnalysis,
  //     children: [
  //       {
  //         path: 'station/:station/:dateTime',
  //         name: 'station',
  //         component: TabContent
  //       }
  //     ]
  //   }
   ]
});
